home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-09 | 1.1 KB | 39 lines | [TEXT/MEDT] |
- MODULE PrintExample; (* demonstrates the access to the printer. *)
-
- FROM Printer IMPORT OpenPrinter, Reset, ClosePrinter, PrintScreen,
- PrintWindow, WriteString, WriteLn, Write;
-
- IMPORT InOut;
-
- CONST FF = 14C; (* FF = Form feed *)
-
- VAR ok : BOOLEAN;
- ch : CHAR;
-
- BEGIN
- OpenPrinter(ok);
- IF ok THEN
- Reset;
- InOut.WriteString("This is a screendump. The whole screen is printed.");
- PrintScreen;
- InOut.WriteLn;
- InOut.WriteString("Type a key to continue : ");
- InOut.Read(ch);
- InOut.Write(FF);
- InOut.WriteString("This was a FF written to the 'Terminal' window.");
- Write(FF);
- WriteString("This was a FF written to the printer!");
- WriteLn;
- WriteString("Now the terminal window is printed.");
- WriteLn;
- InOut.WriteString("Type a key to continue : ");
- InOut.Read(ch);
- PrintWindow(NIL,TRUE);
- WriteString("End of printer demo.");
- ClosePrinter;
- ELSE
- (* Link to printer could not be established (printer off ?) *)
- END (* IF *);
- END PrintExample.
-
-